Hi, I have to write dxl code and I do not see any custom logging functionality I searched and found something and make little adaptation. I am wondering if there are some leaks and memory problems with it because in one function 100 lines I use it between 10-20 times.
Dinio - Tue Jan 05 05:46:29 EST 2016 |
Re: How to crete log4dxl library? No large memory problems here. If you log so much, that you run out of memory you should definitely check your logging ;-) Anyway your usage of lineCounter is weird. I would expect it to be increased and set to 0 once it hits logFlushEveryNLines. Instead you are setting logFlushEveryNLines to 0? And you could maybe print prefix and the message separately to avoid concatenating to a new string each time. Regards, Mathias |